projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
435ed31
)
Fix a possible crash in gtk_show_uri
author
Matthias Clasen
<mclasen@redhat.com>
Mon, 19 Apr 2021 20:39:53 +0000
(16:39 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Mon, 19 Apr 2021 20:49:02 +0000
(16:49 -0400)
g_file_get_basename can return NULL.
Deal with it somehow.
Fixes: #3883
gdk/x11/gdkapplaunchcontext-x11.c
patch
|
blob
|
history
diff --git
a/gdk/x11/gdkapplaunchcontext-x11.c
b/gdk/x11/gdkapplaunchcontext-x11.c
index 206c34e52dbd2d7158fe90f83b4a9ed61b6b6d8a..43c190e5e6372625bc970274ec95ed7f2a500137 100644
(file)
--- a/
gdk/x11/gdkapplaunchcontext-x11.c
+++ b/
gdk/x11/gdkapplaunchcontext-x11.c
@@
-45,6
+45,9
@@
get_display_name (GFile *file,
if (name == NULL)
{
name = g_file_get_basename (file);
+ if (name == NULL)
+ name = g_file_get_uri (file);
+
if (!g_utf8_validate (name, -1, NULL))
{
tmp = name;